
<template>
    <rx-dialog :showok="false" @cancel="cancel">
        <rx-layout>
           <div slot="center">
               <a-form-model ref="form"  :model="mdl" :rules = "rules" :label-col="labelCol" :wrapper-col="wrapperCol">
                        <a-col :span="12">
                        <a-form-model-item  :label="i18n('updateTime','修改时间')" >
                                {{mdl.updateTime}}
                        </a-form-model-item>
                        </a-col>
                        <a-col :span="12">
                        <a-form-model-item  :label="i18n('version','版本')" >
                                {{mdl.version}}
                        </a-form-model-item>
                        </a-col>
                   <a-col :span="24">
                           <rx-codemirror ref="content"
                                          :mode="'vue'"
                                          :height="'auto'"
                                          :readOnly="true"
                                          v-model="mdl.content"
                           >
                           </rx-codemirror>
                   </a-col>

            </a-form-model>
           </div>
        </rx-layout>
    </rx-dialog>
</template>
<script>
    import ListHistoryApi from '@/api/form/core/listHistory'
    import {RxDialog,RxCodemirror,BaseFormModel} from "@lowcode/jpaas-common-lib";


    export default {
        name: 'ListHistoryEdit',
        mixins:[BaseFormModel],
        components: {
            RxDialog,
            RxCodemirror
        },
        data(){
            return {
                /**
                 * 子表列表，以及表格属性
                 */
                subTable:{
            },
            rules: {
                listId: [{ required:false,message:this.i18n('listId','请输入列表ID','input'), trigger: 'change' }],
                content: [{ required:false,message:this.i18n('templateContent','请输入模板内容','input'), trigger: 'change' }],
                version: [{ required:false,message:this.i18n('version','请输入版本','input'), trigger: 'change' }],
            }
        }
        },
        methods: {
            i18n(name,text,key){
                return this.$ti18(name,text,"ListHistory",key);
            },
            get(id){
                return ListHistoryApi.get(id);
            },

            save(){
               return ListHistoryApi.save(this.mdl);
            },

        }
    }
</script>
<style>
    .relick a{
        margin-right: 10px;
    }

</style>